#@layout()
#define main()
    #if(0) ### 为了自动提示，实际运行中不使用
    <head>
        <link rel="stylesheet" href="../../..xpsoft/common/layui/css/layui.css">
	</head>
	#end
	<div>
		<div style="margin:5px 0;border-bottom:1px solid #aaa;">
			<span class="layui-breadcrumb">
				<a href="xpApi/user">接口用户管理</a>
				<a><cite>列表</cite></a>
			</span>
        </div>
		<form id="form1" class="layui-form" action="xpApi/user" method="post" style="padding:0px 0 0 20px;">
			<div class="layui-form-item" style="margin-bottom: 0;">
				<div class="layui-inline">
					<label class="layui-form-label">用户名</label>
					<div class="layui-input-inline">
						<input class="layui-input" type="text" name="userName" value="#(userName)">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">手机</label>
					<div class="layui-input-inline">
						<input class="layui-input" type="text" name="phone"  value="#(phone)">
					</div>
				</div>
				<div class="layui-inline">
				&nbsp;<input class="layui-btn layui-btn-sm" type="submit" value="查询">
				#if(bCanAdd)
				<a class="layui-btn layui-btn-primary layui-btn-sm" href="xpApi/addUser_ui">
				<span>添加用户</span>
				</a>
				#end
				</div>
			</div>
		</form>
	</div>
		<table class="layui-table" lay-even="">
			<colgroup>
				<col width="90">
				<col width="200">
				<col width="200">
				<col width="150">
				<col width="200">
				<col width="150">
				<col width="100">
			</colgroup>
				<tr id="first_tr">
					<th>序号</th>
					<th>用户名</th>
					<th>部门</th>
					<th>姓名</th>
					<th>手机号</th>
					<th>到期日期</th>
					<th>状态</th>
				</tr>
				#for(x : lists.getList()??)
				<tr>
					<td >#((lists.pageNumber-1)*lists.pageSize+for.index+1)</td>
					<td >
					#if(bCanEdit)
					<a href="xpApi/editUser_ui?id=#(x.id)">#(x.userName)</a>
					#else
					#(x.userName)
					#end
					</td>
					<td >#(x.deptName)</td>
					<td >#(x.name)</td>
					<td >#(x.phone)</td>
					<td >#(x.dqrq)</td>					
					#if(x.state=="0")
					<td class="layui-bg-gray">禁用</td>
					#else
					<td class="layui-bg-green" style="color:white;">启用</td>
					#end
				</tr>
				#end
		</table>

	<div id="_paginate"  style="margin-left: 10px;"></div>
	<script type="text/javascript">
		$(function(){
			xpsoft.paginate("_paginate",#(lists.pageNumber??1), #(lists.totalRow??1), "#(BASE_PATH)/xpApi/user","form1");	
		});
		
	</script>
		
#end
